{
  "properties" : { },
  "id" : "1831239d8c0d4e2884728605244e008d",
  "script" : null,
  "groupId" : "3e4ed85f2bd6439394a92324446300f3",
  "name" : "查询",
  "createTime" : 1727071066857,
  "updateTime" : 1726735879866,
  "lock" : "1",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "list",
  "method" : "POST",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "{\r\n    \"size\": 20,\r\n    \"current\": 1\r\n}",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"status\": 200,\n    \"message\": \"success\",\n    \"data\": {\n        \"total\": 2,\n        \"current\": 1,\n        \"size\": 20,\n        \"records\": [\n            {\n                \"id\": \"1833709511836307456\",\n                \"startIp\": \"192.100.5.1\",\n                \"endIp\": \"192.100.5.1\",\n                \"flagStatus\": 1,\n                \"createTime\": \"2024-09-11 11:29:50\",\n                \"cronId\": \"2\",\n                \"cronExpre\": \"每周一凌晨两点执行\",\n                \"rowId\": 1\n            },\n            {\n                \"id\": \"1836618631266664448\",\n                \"startIp\": \"123.5.2.110\",\n                \"endIp\": \"123.5.2.999\",\n                \"flagStatus\": 0,\n                \"createTime\": \"2024-09-19 12:09:39\",\n                \"cronId\": \"1\",\n                \"cronExpre\": \"每天凌晨两点执行\",\n                \"rowId\": 2\n            }\n        ]\n    }\n}",
  "description" : "",
  "requestBodyDefinition" : {
    "name" : "root",
    "value" : "",
    "description" : "",
    "required" : false,
    "dataType" : "Object",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ {
      "name" : "startIp",
      "value" : "192",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "size",
      "value" : "20",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "current",
      "value" : "1",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    } ]
  },
  "responseBodyDefinition" : {
    "name" : "",
    "value" : "",
    "description" : "",
    "required" : false,
    "dataType" : "Object",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ {
      "name" : "status",
      "value" : "200",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "message",
      "value" : "success",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "data",
      "value" : "",
      "description" : "",
      "required" : false,
      "dataType" : "Object",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ {
        "name" : "total",
        "value" : "3",
        "description" : "",
        "required" : false,
        "dataType" : "Integer",
        "type" : "",
        "defaultValue" : "",
        "validateType" : "",
        "error" : "",
        "expression" : "",
        "children" : [ ]
      }, {
        "name" : "current",
        "value" : "1",
        "description" : "",
        "required" : false,
        "dataType" : "Integer",
        "type" : "",
        "defaultValue" : "",
        "validateType" : "",
        "error" : "",
        "expression" : "",
        "children" : [ ]
      }, {
        "name" : "size",
        "value" : "30",
        "description" : "",
        "required" : false,
        "dataType" : "Integer",
        "type" : "",
        "defaultValue" : "",
        "validateType" : "",
        "error" : "",
        "expression" : "",
        "children" : [ ]
      }, {
        "name" : "records",
        "value" : "",
        "description" : "",
        "required" : false,
        "dataType" : "Array",
        "type" : "",
        "defaultValue" : "",
        "validateType" : "",
        "error" : "",
        "expression" : "",
        "children" : [ {
          "name" : "",
          "value" : "",
          "description" : "",
          "required" : false,
          "dataType" : "Object",
          "type" : "",
          "defaultValue" : "",
          "validateType" : "",
          "error" : "",
          "expression" : "",
          "children" : [ {
            "name" : "id",
            "value" : "1818858585051983874",
            "description" : "",
            "required" : false,
            "dataType" : "String",
            "type" : "",
            "defaultValue" : "",
            "validateType" : "",
            "error" : "",
            "expression" : "",
            "children" : [ ]
          }, {
            "name" : "startIp",
            "value" : "61.2.9.1",
            "description" : "",
            "required" : false,
            "dataType" : "String",
            "type" : "",
            "defaultValue" : "",
            "validateType" : "",
            "error" : "",
            "expression" : "",
            "children" : [ ]
          }, {
            "name" : "endIp",
            "value" : "61.2.9.255",
            "description" : "",
            "required" : false,
            "dataType" : "String",
            "type" : "",
            "defaultValue" : "",
            "validateType" : "",
            "error" : "",
            "expression" : "",
            "children" : [ ]
          }, {
            "name" : "cronId",
            "value" : "1",
            "description" : "",
            "required" : false,
            "dataType" : "String",
            "type" : "",
            "defaultValue" : "",
            "validateType" : "",
            "error" : "",
            "expression" : "",
            "children" : [ ]
          }, {
            "name" : "createTime",
            "value" : "2024-08-01 00:00:00",
            "description" : "",
            "required" : false,
            "dataType" : "String",
            "type" : "",
            "defaultValue" : "",
            "validateType" : "",
            "error" : "",
            "expression" : "",
            "children" : [ ]
          }, {
            "name" : "flagStatus",
            "value" : "true",
            "description" : "",
            "required" : false,
            "dataType" : "Boolean",
            "type" : "",
            "defaultValue" : "",
            "validateType" : "",
            "error" : "",
            "expression" : "",
            "children" : [ ]
          }, {
            "name" : "rowId",
            "value" : "1",
            "description" : "",
            "required" : false,
            "dataType" : "String",
            "type" : "",
            "defaultValue" : "",
            "validateType" : "",
            "error" : "",
            "expression" : "",
            "children" : [ ]
          } ]
        } ]
      } ]
    } ]
  }
}
================================
var sql = """   
    SELECT ic.* ,dc.description cron_expre FROM auto_discover_ip_config ic 
    left join auto_discover_cron dc on ic.cron_id = dc.id
    <where>
        <if test="startIp != null and startIp != '' ">
            and start_Ip LIKE CONCAT('%',#{body.startIp} ,'%')
        </if>  

        <if test="endIp != null and endIp != ''">
            and end_Ip LIKE CONCAT('%',#{body.endIp} ,'%')
        </if>
    </where>
"""
return db.page(sql,body.size,body.current-1)
// var sql = """   
//         select * from auto_discover_ip_config 
//         <where>
//             <if test=" !is_blank(body.startIp) ">
//                 start_Ip like concat('%',#{body.startIp},'%')  
//             </if>
//             <if test=" !is_blank(body.endIp) ">
//                 endIp like concat('%',#{body.endIp},'%')  
//             </if>
//         </where>
//         order by id
//     """;

// return db.page(sql,body.size,body.current-1);